<p class="bg">{$banner_upload_descr}</p>

{if $banner_notice}
	<p>{$banner_notice}</p>
{/if}

{if $error}
	<p class="warning_bold">{$smarty.const.LA_WARNING}</p>

	{if $error==31}
 		{$smarty.const.LA_UPLOAD_ERROR1}
	{elseif $error==2}
		{$smarty.const.LA_UPLOAD_ERROR2}
	{elseif $error==3}
		{$errorDescr}
	{elseif $error==6}
		{$smarty.const.LA_NO_MOREPIC}
	{/if}
{/if}

{if $upload_ok}
	<p><b>{$smarty.const.LA_ADMIN_BANNER_UPLOADED}</b></p>
{/if}

{if $image_upload_size}
	<p>{$image_upload_size}</p>
{/if}

<p>{$upload_status}</p>


{if $show_form}
<form method='post' name="form1" action='adm_banner.php' enctype='multipart/form-data'>
{if $edit_banner}
	{literal}
	<script language="Javascript" type="text/javascript">
	function ShowHide() {
	   var head1 = document.getElementById("head1");
	   var head2 = document.getElementById("head2");
	   var head3 = document.getElementById("head3");
	   var showhead1 = document.form1.replace_banner.checked;
	   //var showhead2 = document.form1.head2.checked;
	   head1.style.visibility=(showhead1) ? "visible" : "hidden";
	   head2.style.visibility=(showhead1) ? "visible" : "hidden";
	   head3.style.visibility=(showhead1) ? "visible" : "hidden";
	}
	
	</script>
	{/literal}
	<b>{$smarty.const.LA_ADMIN_BANNER_EDIT_POSS}:</b><br />
	<img src="../images/banners/{$image}" borde="0"><br />
	<input type="checkbox" name="replace_banner" value="1" onClick="ShowHide()" id="replace_banner">
	<label for="replace_banner">{$smarty.const.LA_ADMIN_BANNER_REPLACE}</label>
	
	
{/if}

<table class='noBorder'><tr><td>
<input type='hidden' name='cid' value='{$cid}'>
<input type='hidden' name='bid' value='{$bid}'>
<input type='hidden' name='edit_banner' value='{$edit_banner}'>
<input type='hidden' name='name' value='{$name}'>
<input type='hidden' name='MAX_FILE_SIZE' value='1000000'>
<p>{$smarty.const.LA_ADMIN_BANNER_UP_FILE}<br />
<span ID="head2">
<input name='photo' size='50' type='file' onchange="setImage(this.value)" value="{$edit_banner}">
</span>
<table cellpadding="0" cellspacing="5" class="noBorder">

<tr id="head1"><td>
{$smarty.const.LA_ADMIN_BANNER_RESIZE} </td><td>  
<input type="radio" name="program" value="0" checked> {$smarty.const.LA_ADMIN_BANNER_NONE}
<input type="radio" name="program" value="1"> ImageMagick
<input type="radio" name="program" value="2"> GD
</td></tr>
<tr id="head3"><td>
{$smarty.const.LA_ADMIN_BANNER_SIZE} </td><td>  <input type='text' name='size' value='{$size}' size="6"> ({$smarty.const.LA_ADMIN_BANNER_SIZE_DESCR})
</td></tr>

<tr><td>
{$smarty.const.LA_ADMIN_BANNER_RUN_FOR}</td><td>  <input type='text' name='run_for_days' value='{$run_for_days}' size='6'> days <font color='red'>*</font>
</td></tr>
<tr><td>
{$smarty.const.LA_ADMIN_BANNER_RUN_FOR} </td><td>  <input type='text' name='run_for_hits' value='{$run_for_hits}' size='6'> hits <font color='red'>*</font>
</td></tr>
<tr><td>
{$smarty.const.LA_ADMIN_BANNER_RUN_FOR} </td><td>  <input type='text' name='run_for_clicks' value='{$run_for_clicks}' size='6'> clicks <font color='red'>*</font>
</td></tr>


<tr><td>
{$smarty.const.LA_ADMIN_BANNER_SECTION} </td><td>  <input type='text' name='section' value='{$section}' size='29'> <font color='red'>*</font>
</td></tr>

<tr><td>
{$smarty.const.LA_ADMIN_BANNER_URL} </td><td>  <input type='text' name='goto_url' value='{$goto_url}' size='29'>
</td></tr>



<tr><td>{$smarty.const.LA_ADMIN_BANNER_HTML}<br /><small>{$smarty.const.LA_ADMIN_BANNER_HTML_DESCR}</small> </td><td><textarea name="html_banner" cols="22" rows="7">{$html_banner}</textarea></td></tr>


<tr><td>{$smarty.const.LA_ADMIN_BANNER_RUN_IN_CATS} </td><td><select name="run_in_group[]" size="10" multiple>{$list}</select></td></tr>

<tr><td>
{$smarty.const.LA_ADMIN_BANNER_STATUS} </td><td> 
<input type='radio' name='status' value='1' {if $status==1} checked {/if}> {$smarty.const.LA_ADMIN_BANNER_ACTIVE}
<input type='radio' name='status' value='2' {if $status==2} checked {/if}> {$smarty.const.LA_ADMIN_BANNER_DEACTIVE}
</td></tr>

</table>


</p>
<input type='submit' name='submit' value='{$smarty.const.LA_ADMIN_BANNER_BTN_UPLOAD}' class="button"></form>
</form>
</td><td><img height="100" id="previewImage" src='../layout_images/blank.gif' /></td></tr></table>
{/if}
{if $edit_banner}
{literal}
	<script language="Javascript" type="text/javascript">
	var head1 = document.getElementById("head1");
	var head2 = document.getElementById("head2");
	var head3 = document.getElementById("head3");
	head1.style.visibility="hidden";
	head2.style.visibility="hidden";
	head3.style.visibility="hidden";
	
	</script>
{/literal}

{/if}

{foreach item=image from=$image_list}  
	
	<table class='noBorder'border="0" cellspacing="0" cellpadding="1" bgcolor="#A9B8D1"><tr><td bgcolor="#A9B8D1">
	
	<table class='noBorder' border="0" width="100%" bgcolor="#FFFFFF" cellspacing="0" cellpadding="0"><tr><td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="5"><tr><td align="left">
		
	<img src='../images/banners/{$image.filename}' border='0' />
	</td></tr></table><table border="0" width="100%" bgcolor="#A9B8D1" cellspacing="0" cellpadding="4"><tr><td width="100%" align="center"><a href='adm_banner.php?cid={$image.cid}&edit_banner={$image.bid}'><img src="../layout_images/pointer.gif" border="0">{$smarty.const.LA_ADMIN_BANNER_EDIT}</a>  |  <a href='adm_banner.php?cid={$image.cid}&del={$image.bid}'><img src="../layout_images/pointer.gif" border="0">{$smarty.const.LA_ADMIN_BANNER_DEL}</a>
	
	|  
	{if $image.status==1}
	{$smarty.const.LA_ADMIN_BANNER_ACTIVE}
	{else}
	{$smarty.const.LA_ADMIN_BANNER_DEACTIVE}
	{/if}
	</td></tr></table></td></tr></table></td></tr></table><br>
{/foreach}
